package com.github_dididipapa.common.transmonitor;

import com.github_dididipapa.common.validator.IsShowStatusConstraintValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

//自定义校验注解 ==> 元注解
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(
        validatedBy = {IsShowStatusConstraintValidator.class}
)
public @interface IsShowStatus {
    //错误信息
    String message() default "{com.github_dididipapa.common.transmonitor.IsShowStatus.messgae}";
    //分组
    Class<?>[] groups() default {};
    //负载
    Class<? extends Payload>[] payload() default {};

    int[] values();
}
